from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
from options import options
from service import service
from login_para import login

url = r'http://192.168.4.6/upload/'
username = 'admin'
password = 'root'
dr = webdriver.Chrome(options=options,service=service)
dr.get(url)
dr.maximize_window()

login = login(dr)
login.login(username, password)
    # 1、点击默认版块
dr.find_element(By.XPATH,'//*[@id="category_1"]/table/tbody/tr[1]/td[2]/h2/a').click()
sleep(2)
    # 2、点击帖子
dr.find_element(By.CLASS_NAME,'s.xst').click()
sleep(3)
login.logout()
sleep(3)

dr.quit()
